 package uk.co.mmscomputing.device.twain;
 
 import uk.co.mmscomputing.device.scanner.ScannerDevice;
 import uk.co.mmscomputing.device.scanner.ScannerIOMetadata;
 
 public class TwainIOMetadata extends ScannerIOMetadata
 {
   public static final String[] TWAIN_STATE = { "", "Pre-Session", "Source Manager Loaded", "Source Manager Open", "Source Open", "Source Enabled", "Transfer Ready", "Transferring Data" };
 
   private TwainSource source = null;
 
   private TwainTransfer.MemoryTransfer.Info memory = null;
 
   public String getStateStr()
   {
     return TWAIN_STATE[getState()];
   }
 
   void setSource(TwainSource paramTwainSource) {
     this.source = paramTwainSource; } 
   public TwainSource getSource() { return this.source; } 
   public ScannerDevice getDevice() { return this.source; }
 
 
   public void setMemory(TwainTransfer.MemoryTransfer.Info paramInfo)
   {
     this.memory = paramInfo; } 
   public TwainTransfer.MemoryTransfer.Info getMemory() { return this.memory; }
 
   public boolean isFinished() {
     return (getState() == 3) && (getLastState() == 4);
   }
 }

